<!--Start Javascript infotoggle-->
<script type="text/javascript">
$("document").ready(function(){
	$(".btnInformation").click(function(e){
		var $kid=$(e.target).parent().parent().children('.carInformation');
		$kid.slideToggle('slow',function(){
			if($(this).css('display')=='none')
			{
				$(e.target).attr('value','Visa information');
			}
			else
			{
				$(e.target).attr('value','Dölj information');
			}
		//Animation complete
		});
	});	
});
</script>
<!--End Javascript infotoggle-->


<?php echo validation_errors('<div class="error">*','</p></div>'); ?>

 
<div id="rightSearchColumn">	
	
<?php foreach($query as $row)
{
//Sätter egenskaper för en bilbild
$imgProp=array(
	      		'src' => $row->LitenBild,
          		'width' => '91',
          		'height' => '68',
          		'title' => $row->Modell,
				);
echo
	'<div class="carContainer">
		<div class="carCol1">'.
			img($imgProp).
		'</div>
		<div class="carCol2">
			<h3>'.$row->Modell.'</h3>
		</div>
		<div class="carCol3">
			'.form_open('booking/Totalprice/index').'
				<input type="hidden" name="carId" value="'.$row->ID.'"/>
				<input type="hidden" name="startDate" value="'.$startDate.'"/>
				<input type="hidden" name="endDate" value="'.$endDate.'"/>
				<input type="submit" class="btnOrder" value="Gå till bokning"/>
			</form>
			<input type="button" class="btnInformation" value="information"/>
		</div>
		<div class="carInformation">
			<div class="carInformationLeftCol">
				<h3>Information</h3>
				<p>'.$row->Info.'</p>
			</div>
			<div class="carInformationRightCol">
				<h3>Pris</h3>
				<h5>Tim pris:'.$row->TimmarPris.' kr</h5>
				<h5>Dag pris:'.$row->DagPris.' kr</h5>
				<h5>Vecko pris:'.$row->VeckoPris.' kr</h5>
			</div>
		</div>
	</div>';
}?>	

</div>

